﻿using __Able.Network.Utils;

namespace __Able.Network.Packets
{
    public abstract class _InPacket : _Packet
    {
        /// <summary>
        /// </summary>
        /// <param name="header">The header.</param>
        /// <param name="source">The source.</param>
        /// <param name="command">The command.</param>
        /// <param name="user">The user.</param>
        public _InPacket(byte header, ushort source, ushort command, User user)
            : base(header, source, command, (char)0, user)
        {
        }
        /// <summary>
        /// </summary>
        /// <param name="buf">The buf.</param>
        /// <param name="length">The length.</param>
        /// <param name="user">The user.</param>
        public _InPacket(ByteBuffer buf, int length, User user) : base(buf, length, user) { }
        /// <summary>
        /// </summary>
        /// <param name="buf">The buf.</param>
        /// <param name="user">The user.</param>
        public _InPacket(ByteBuffer buf, User user) : base(buf, user) { }
        /// <summary>
        /// 校验头部, 默认返回 true
        /// </summary>
        /// <returns>true</returns>
        protected override bool ValidateHeader()
        {
            return true;
        }
    }
}
